﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;

namespace Komunikator.Core
{
    class ConnectionHolder
    {

        //public static Socket socket;
        public PacketReceiver packetReceiver;
        public PacketSender packetSender;
        private MainWindow mwHandle;
        private TcpClient tcpClient;
        private NetworkStream netstream;

        public ConnectionHolder(MainWindow mw)
        {
            mwHandle = mw;
        }

        public void Initialize()
        {


            tcpClient = new TcpClient(HttpConnector.ggServerAddress, 8074);
            netstream = tcpClient.GetStream();
            packetReceiver = new PacketReceiver(mwHandle, netstream);
            packetSender = new PacketSender(mwHandle, netstream);
        }



    }
}
